package fiuba.algo3.algoThieft.modelo;

public abstract class Pista {
	
    protected String pista;
    protected Caracteristica caracteristica;
    
    public String comoString() {
            return this.pista;
    }
    
    public boolean hayCaracteristicaGuardada (){
    	return this.caracteristica!=null;
    }
    
    public void guardarCaracteristica (Caracteristica caracteristica){
	    if (this.hayQueGuardar()){
			this.pista = this.pista + ". " +  caracteristica.comoString();
		}
		this.caracteristica = caracteristica;
	}
    
    protected abstract boolean hayQueGuardar();
    
    public Caracteristica getCaracteristica (){
    	return this.caracteristica;
    }
}
